    % CALCULATE TRADE ELASTICITY

        import_tariff_temp_1.US = import_tariff.US-0.1;
        import_tariff_temp_1.OECD = import_tariff.OECD-0.1;
        
    [export_revenues_1_US,export_revenues_1_OECD,export_share_1_US,export_share_1_OECD,...
        wage_level_1_US,wage_level_1_OECD,real_consumption_1_US,real_consumption_1_OECD,...
        output_1_US,output_1_OECD,prices_1_US,prices_1_OECD,exports_1_US,exports_1_OECD,...
        imports_elasticity_measure_lowtariff_US, imports_elasticity_measure_lowtariff_OECD] = ...
        find_equilibrium_trade_elasticity_real_sigma(wage.OECD,qualities_vec.US,qualities_vec.OECD,domestic_competitor_qual_vec.US,domestic_competitor_qual_vec.OECD,...
        import_tariff_temp_1.US,import_tariff_temp_1.OECD,l.US,l.OECD,n_varieties,export_share.US(end),export_share.OECD(end),mu_bar.US(end),mu_bar.OECD(end),sigg);
        
        import_tariff_temp_2.US = import_tariff.US;
        import_tariff_temp_2.OECD = import_tariff.OECD;
        
    [export_revenues_2_US,export_revenues_2_OECD,export_share_2_US,export_share_2_OECD,...
        wage_level_2_US,wage_level_2_OECD,real_consumption_2_US,real_consumption_2_OECD,...
        output_2_US,output_2_OECD,prices_2_US,prices_2_OECD,exports_2_US,exports_2_OECD,...
        imports_elasticity_measure_hightariff_US, imports_elasticity_measure_hightariff_OECD] = ...
        find_equilibrium_trade_elasticity_real_sigma(wage.OECD,qualities_vec.US,qualities_vec.OECD,domestic_competitor_qual_vec.US,domestic_competitor_qual_vec.OECD,...
        import_tariff_temp_2.US,import_tariff_temp_2.OECD,l.US,l.OECD,n_varieties,export_share.US(end),export_share.OECD(end),mu_bar.US(end),mu_bar.OECD(end),sigg);
    
     trade_elasticity_US = (log(imports_elasticity_measure_lowtariff_US)-log(imports_elasticity_measure_hightariff_US))/(log(import_tariff_temp_1.US)-log(import_tariff_temp_2.US));
     trade_elasticity_OECD = (log(imports_elasticity_measure_lowtariff_OECD)-log(imports_elasticity_measure_hightariff_OECD))/(log(import_tariff_temp_1.OECD)-log(import_tariff_temp_2.OECD));
     
     trade_elasticity_avg = (trade_elasticity_US+trade_elasticity_OECD)/2;